package cn.com.surker.material.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 资产登记日志
 * </p>
 *
 * @author admin
 * @since 2023-11-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MaterialPropertyLog implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 资产编号
     */
    private String code;

    /**
     * 公司ID
     */
    private Long orgId;

    /**
     * 公司
     */
    private String orgName;

    /**
     * 责任人ID
     */
    private Long uid;

    /**
     * 责任人
     */
    private String name;

    /**
     * 登记人
     */
    private String reason;

    /**
     * 状态(0：启用，1：禁用)
     */
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public MaterialPropertyLog(){}
    public MaterialPropertyLog(String code, Long orgId, String orgName, Long uid, String name, String reason, Integer status, String remark, Date createTime) {
        this.code = code;
        this.orgId = orgId;
        this.orgName = orgName;
        this.uid = uid;
        this.name = name;
        this.reason = reason;
        this.status = status;
        this.remark = remark;
        this.createTime = createTime;
    }
}
